package com.handinfo.android.game.particle;

import android.graphics.Bitmap;

import com.handinfo.android.DWGameManager;
import com.handinfo.android.core.object.Animation;
import com.handinfo.android.core.resource.DWSerializableFactory;
import com.handinfo.android.core.resource.ResHead;
import com.handinfo.android.core.resource.ResourceManager;


import com.handinfo.android.ui.UIWindows;

public class ParticleConstants {
	private static String URL_HEART_ANIM = "/anim/jh_yanhua.anim";
	private static String URL_KISS_ANIM = "/anim/jh_xin.anim";
	private static String URL_HILIGHT_ANIM = "/anim/jh_denglong.anim";

	// 资源
	public static Bitmap[] m_gold;//元宝
	public static Bitmap[] m_petal;//花瓣
	public static Animation m_hilight;//喜灯
	public static Animation m_heart;//闪心
	public static Animation m_kiss;//亲亲
	public static Animation[] m_effect0;//礼花

	public static void initResource() {
		m_gold = new Bitmap[8];
		m_petal = new Bitmap[8];
		for (int i = 0; i < m_gold.length; i++) {
			m_gold[i] = UIWindows
					.createImage("/img/particle/quanping_yuanbao_0" + (i + 1)
							+ ".gnp");
			m_petal[i] = UIWindows.createImage("/img/particle/quanping_laba_0"
					+ (i + 1) + ".gnp");
		}
		ResHead head = new ResHead(DWSerializableFactory.RESOURCE_TYPE_ANIM,
				URL_HEART_ANIM, 1);
		m_heart = (Animation) (ResourceManager.getInstance().loadResource(
						DWGameManager.getInstance().m_resourceStatic, head));
	    head = new ResHead(DWSerializableFactory.RESOURCE_TYPE_ANIM,
	    		URL_KISS_ANIM, 1);
	    m_kiss = (Animation) (ResourceManager.getInstance().loadResource(
						DWGameManager.getInstance().m_resourceStatic, head));
	    head = new ResHead(DWSerializableFactory.RESOURCE_TYPE_ANIM,
	    		URL_HILIGHT_ANIM, 1);
	    m_hilight = (Animation) (ResourceManager.getInstance().loadResource(
						DWGameManager.getInstance().m_resourceStatic, head));
	    m_effect0 = new Animation[4];
	    for(int i=0;i<m_effect0.length;i++){
	    	String url = "/anim/yanhua_"+(i+1)+".anim";
	    	head = new ResHead(DWSerializableFactory.RESOURCE_TYPE_ANIM,
	    			url, 1);
	    	m_effect0[i] = (Animation) (ResourceManager.getInstance().loadResource(
	    			DWGameManager.getInstance().m_resourceStatic, head));
	    }
	}

	// 常量
	public static final byte 类型_元宝 = 0;
	public static final byte 类型_花瓣 = 1;
	public static final byte 类型_喜灯 = 2;
	public static final byte 类型_闪心 = 3;
	public static final byte 类型_亲亲 = 4;
	public static final byte 类型_礼花0 = 5;
	
	public static final byte 轨迹_左斜线 = 0;
	public static final byte 轨迹_右斜线 = 1;
	public static final byte 轨迹_花瓣 = 2;
	public static final byte 轨迹_喜灯左 = 3;
	public static final byte 轨迹_喜灯右 = 4;
	public static final byte 轨迹_亲亲静止 = 5;
	public static final byte 轨迹_闪心 = 6;
	public static final byte 轨迹_定点礼花0 = 7;
	
	public static final byte 动画组_定点礼花0 = 96;
	public static final byte 动画组_元宝雨_右 = 97;
	public static final byte 动画组_花瓣雨  = 98;
	public static final byte 动画组_结婚 = 99;

}
